home *** CD-ROM | disk | FTP | other *** search
/ 1st Multimedia Mac Shareware / Multimedia Shareware CD-ROM - BetaCorp.iso / Hypergames / AdventureStacks / ACK-stack / Adventure / card_3680.txt < prev    next >
Encoding:
Text File  |  1988-05-16  |  6.3 KB  |  253 lines

  1. -- card: 3680 from stack: in
  2. -- bmap block id: 8084
  3. -- flags: 0000
  4. -- background id: 2684
  5. -- name: !Globaldata
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 01
  10. -- high flags: 0007
  11. -- rect: left=311 top=39 right=153 bottom=512
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 3
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: ObjectNames
  20. ----- HyperTalk script -----
  21. -- Field script to allow special handling of option-clicked
  22. -- words in ANY text field, whether locked or unlocked
  23. --
  24. -- Guy Kuo, University of Nevada School of Medicine
  25. -- December 13, 1987
  26. --
  27. -- Use this script freely in your owns stacks but please retain the
  28. -- credit line
  29. --
  30. -- Note from Dominus:  I got this out of Steve Drazga‚Äôs amazing
  31. -- <Developer Stack 1.1>.  Friends, if you're doing HyperCard work,
  32. -- then you want Steve‚Äôs stack.   Send $5.00 (best deal around) to:
  33. -- Steve Drazga
  34. -- Box 388
  35. -- Southampton, PA  18966
  36. -- And tell him where you got the address.
  37.  
  38. On MouseWithin -- UNSOM technique by Guy Kuo, December 13, 1987
  39.   -- If the the option key is depressed, set the cursor to indicate
  40.   -- we are in a special mode.  While the option key continues to be
  41.   -- depressed, and the mouse is within the target field, wait for
  42.   -- mouseDowns.  If one occurs, Pick up the word by clicking at the
  43.   -- last MouseLoc twice and getting the selection.
  44.   -- If the selection is not empty, do something with it.  In this demo,
  45.   -- we put it into another field.  Finally, click outside of the field
  46.   -- to avoid looping.  Hopefully, (-1,-1) is outside of all active
  47.   -- objects.
  48.   --
  49.   -- While editing such a field, entry of Optioned characters from
  50.   -- the keyboard no longer requires movement of the mouse outside of
  51.   -- the field.  However, the optioned characters do not appear until
  52.   -- after the option key is released
  53.  
  54.   if the OptionKey is down then
  55.     if the locktext of the target is true then
  56.       put true into DidUnlock
  57.       set locktext of target to false
  58.     else
  59.       put false into DidUnlock
  60.     end if
  61.     set the cursor to 2
  62.     repeat while (the OptionKey is down) and (item 1 of the rect of target <= item 1 of the mouseLoc) and (item 1 of the mouseLoc <= item 3 of the rect of target) and (item 2 of the rect of target <= item 2 of the mouseLoc) and (item 2 of the mouseLoc <= item 4 of the rect of target)
  63.       if the Mouse is down then
  64.         click at the MouseLoc
  65.         click at the ClickLoc
  66.         if the selection <> empty then
  67.           go card selection
  68.         end if
  69.         click at -1,-1
  70.       end if
  71.     end repeat
  72.     if DidUnlock then
  73.       set the locktext of the target to true
  74.     end if
  75.   end if
  76. end MouseWithin
  77.  
  78.  
  79. -- part 2 (field)
  80. -- low flags: 00
  81. -- high flags: 0002
  82. -- rect: left=475 top=155 right=172 bottom=511
  83. -- title width / last selected line: 0
  84. -- icon id / first selected line: 0 / 0
  85. -- text alignment: 65535
  86. -- font id: 3
  87. -- text size: 12
  88. -- style flags: 0
  89. -- line height: 16
  90. -- part name: Totalobjects
  91.  
  92.  
  93. -- part 3 (field)
  94. -- low flags: 00
  95. -- high flags: 0002
  96. -- rect: left=3 top=76 right=95 bottom=123
  97. -- title width / last selected line: 0
  98. -- icon id / first selected line: 0 / 0
  99. -- text alignment: 0
  100. -- font id: 3
  101. -- text size: 12
  102. -- style flags: 0
  103. -- line height: 16
  104. -- part name: Yourloc
  105.  
  106.  
  107. -- part 4 (field)
  108. -- low flags: 00
  109. -- high flags: 0002
  110. -- rect: left=2 top=121 right=139 bottom=127
  111. -- title width / last selected line: 0
  112. -- icon id / first selected line: 0 / 0
  113. -- text alignment: 0
  114. -- font id: 3
  115. -- text size: 12
  116. -- style flags: 0
  117. -- line height: 16
  118. -- part name: yourinitloc
  119.  
  120.  
  121. -- part 5 (field)
  122. -- low flags: 00
  123. -- high flags: 0002
  124. -- rect: left=454 top=321 right=338 bottom=503
  125. -- title width / last selected line: 0
  126. -- icon id / first selected line: 0 / 0
  127. -- text alignment: 0
  128. -- font id: 3
  129. -- text size: 12
  130. -- style flags: 0
  131. -- line height: 16
  132. -- part name: refresh objects
  133.  
  134.  
  135. -- part 7 (field)
  136. -- low flags: 00
  137. -- high flags: 0002
  138. -- rect: left=2 top=165 right=183 bottom=127
  139. -- title width / last selected line: 0
  140. -- icon id / first selected line: 0 / 0
  141. -- text alignment: 0
  142. -- font id: 3
  143. -- text size: 12
  144. -- style flags: 0
  145. -- line height: 16
  146. -- part name: CurScore
  147.  
  148.  
  149. -- part 8 (field)
  150. -- low flags: 00
  151. -- high flags: 0002
  152. -- rect: left=2 top=215 right=233 bottom=127
  153. -- title width / last selected line: 0
  154. -- icon id / first selected line: 0 / 0
  155. -- text alignment: 0
  156. -- font id: 3
  157. -- text size: 12
  158. -- style flags: 0
  159. -- line height: 16
  160. -- part name: MaxWeight
  161.  
  162.  
  163. -- part 9 (button)
  164. -- low flags: 00
  165. -- high flags: A002
  166. -- rect: left=4 top=319 right=338 bottom=78
  167. -- title width / last selected line: 0
  168. -- icon id / first selected line: 0 / 0
  169. -- text alignment: 1
  170. -- font id: 0
  171. -- text size: 12
  172. -- style flags: 0
  173. -- line height: 16
  174. -- part name: Tools
  175. ----- HyperTalk script -----
  176. on mouseUp
  177.   go card "!!useful stuff"
  178. end mouseUp
  179.  
  180.  
  181.  
  182. -- part 10 (field)
  183. -- low flags: 01
  184. -- high flags: 0000
  185. -- rect: left=1 top=21 right=51 bottom=162
  186. -- title width / last selected line: 0
  187. -- icon id / first selected line: 0 / 0
  188. -- text alignment: 0
  189. -- font id: 12
  190. -- text size: 24
  191. -- style flags: 0
  192. -- line height: 32
  193. -- part name: 
  194.  
  195.  
  196. -- part 11 (button)
  197. -- low flags: 00
  198. -- high flags: A003
  199. -- rect: left=416 top=174 right=196 bottom=511
  200. -- title width / last selected line: 0
  201. -- icon id / first selected line: 0 / 0
  202. -- text alignment: 1
  203. -- font id: 3
  204. -- text size: 10
  205. -- style flags: 512
  206. -- line height: 13
  207. -- part name: Update
  208. ----- HyperTalk script -----
  209. on mouseUp
  210.   set the lockscreen to true
  211.   put empty into card field "objectnames"
  212.   put the number of cards into top
  213.   put 1 into zing
  214.   go first card of bkgnd "Object"
  215.   repeat until the short name of this bkgnd is not "Object"
  216.     if the short name of this card is not "!!master object" then
  217.       put the short name of this card into nam
  218.       put nam into line zing of card field "objectnames" of card "!globaldata"
  219.       put nam
  220.       add 1 to zing
  221.     end if
  222.     go next
  223.   end repeat
  224.   go card "!globaldata"
  225.   put zing-1 into card field "totalobjects"
  226.   set the lockscreen to false
  227.   hide the message
  228. end mouseUp
  229.  
  230.  
  231. -- part contents for card part 2
  232. ----- text -----
  233. 0
  234.  
  235. -- part contents for card part 5
  236. ----- text -----
  237. true
  238.  
  239. -- part contents for card part 7
  240. ----- text -----
  241. 0
  242.  
  243. -- part contents for card part 8
  244. ----- text -----
  245. 30
  246.  
  247. -- part contents for card part 3
  248. ----- text -----
  249. !!Master Location
  250.  
  251. -- part contents for card part 10
  252. ----- text -----
  253. Global Data